package com.shanzmoo.admin.web.store;

import com.shanzmoo.admin.domain.dto.StoreStockCheckBillDetailUpdateDTO;
import com.shanzmoo.admin.manager.store.StoreStockCheckBillDetailManager;
import com.shanzmoo.base.bean.SHttpResponse;
import com.shanzmoo.db.store.service.IStoreStockCheckBillDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 库存期初导入单明细 控制层
 *
 * @author fs 2021-03-09
 */
@Api(tags = "库存期初导入单明细")
@RestController
@RequestMapping("/store/stock-check-bill-detail")
public class StoreStockCheckBillDetailController {

    @Autowired
    private IStoreStockCheckBillDetailService storeStockCheckBillDetailService;
    @Autowired
    private StoreStockCheckBillDetailManager storeStockCheckBillDetailManager;

    @ApiOperation(value = "修改")
    @PostMapping("/update")
    public SHttpResponse<Boolean> update(@Valid @RequestBody StoreStockCheckBillDetailUpdateDTO updateDto) {
        storeStockCheckBillDetailManager.updateById(updateDto.convertEntity());
        return SHttpResponse.ok(Boolean.TRUE);
    }
 }
